﻿#ifndef _OI_PLSCANNERCORE_PROFILEVIEW_HPP_
#define _OI_PLSCANNERCORE_PROFILEVIEW_HPP_

#include "PLScannerCore/OiPLScannerCore.hpp"

namespace Oi
{
    namespace PLScannerCore
    {
        class OI_PLSCANNER_CORE_API ProfileView : public QGraphicsView
        {
        public:
            ProfileView(QWidget *parent = Q_NULLPTR);
            virtual ~ProfileView();

            ProfilesChart* chart();

            void zoomFit();

            void setHRange();

            void setVRange();


        protected:
            virtual void resizeEvent(QResizeEvent *event);
            virtual void wheelEvent(QWheelEvent *event);
            virtual void mousePressEvent(QMouseEvent *event);
            virtual void mouseMoveEvent(QMouseEvent* event);
            virtual void mouseReleaseEvent(QMouseEvent* event);
            virtual void mouseDoubleClickEvent(QMouseEvent* event);
            virtual void paintEvent(QPaintEvent *event);

        private:
            OI_DISABLE_COPY(ProfileView);
            OI_DECLARE_IMPL(ProfileView);

        };

    }
}

#endif